{% extends 'base.html' %}
{% block title %}
    <a class="navbar-brand" href="#"> {{ staff.username }} 的外语水平信息 </a>
{% endblock %}
{% block write %}
    <li>
    <a href="{{ url_for('write_staff_languages',userID = staff.userID) }}" class="btn btn-simple btn-info btn-icon like" data-toggle="dropdown">
        添加外语水平
    </a>
    </li>
{% endblock %}
{% block content %}
    <div class="content">
		{% if staff_languages == [] %}
			<h4 class="title">{{ staff.username }}暂无外语水平信息</h4>
		{% else %}
			<h4 class="title">{{ staff.username }}的外语水平</h4>
		{% endif %}

        <div class="toolbar">

            <!--        Here you can write extra buttons/actions for the toolbar              -->
        </div>
            <div class="material-datatables">
                <table id="datatables" class="table table-striped table-no-bordered table-hover"
                       style="width:100%;cellspacing:0">
                    <thead>
                    <tr>
                        <th>姓名</th>
						<th>语种</th>
						<th>熟练度</th>
                        <th class="disabled-sorting text-right">操作</th>
                    </tr>
                    </thead>

                    <tbody>
					{% for staff_language in staff_languages %}
						<tr>
							<td>{{ staff.username }}</td>
							<td>{{ staff_language.language }}</td>
							<td>{{ staff_language.prificiency }}</td>
							<td class="text-right">
                                <form  method="post" action="{{ url_for('staff_languages_delete',userID=staff.userID,id=staff_language.id) }}">
								    <a href="{{ url_for('change_staff_languages',userID=staff.userID,id=staff_language.id) }}"
								   class="btn btn-simple btn-info btn-icon like">修改</a>
                                    <input name="delete" type="submit" value="删除" onclick="return confirm('确认删除？')" class="btn btn-simple btn-danger btn-icon remove">
                                </form>
							</td>
						</tr>
					{% endfor %}
                    </tbody>

                </table>
            </div>
	</div>

{% endblock %}